<!-- sidebar.php -->
<div id="sidebar" class="four columns">
	<?php 
	get_search_form(); 
	
	/**
	 * Output the main menu if set
	 */
	$args = array(
		'theme_location' 	=> 'sidebar-menu',
		'container'       	=> false,
		// 'container_class' 	=> 'container',
		'menu_id'        	=> 'sidebar-nav',
		'menu_class'		=> 'vert-nav',
		'echo'				=> false,
		'fallback_cb' 		=> false
	);
	$menu = wp_nav_menu($args);
	if ($menu) :
	?>
	<div id="sidebar-navigation">
		<?php
			echo $menu;
		?>
	</div> <!-- end #primary-nav -->
	<?php
	endif;
	
	// Reach for the appropriate Sidebar
	if (is_archive() && is_active_sidebar('sidebar_posts')) : dynamic_sidebar('sidebar_posts');
	elseif (is_home() && is_active_sidebar('sidebar_posts')) : dynamic_sidebar('sidebar_posts');		
	elseif (is_single() && is_active_sidebar('sidebar_posts')) : dynamic_sidebar('sidebar_posts');
	elseif (is_page() && is_active_sidebar('sidebar_pages')) : dynamic_sidebar('sidebar_pages');
	elseif (is_search() && is_active_sidebar('sidebar_posts')) : dynamic_sidebar('sidebar_pages');
	elseif (is_front_page() && is_active_sidebar('sidebar_home')) : dynamic_sidebar('sidebar_home');
	else : 
	
		if (!dynamic_sidebar('sidebar')) ;
	
	endif; 
	?>
</div> <!-- end #sidebar -->